﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.Components.Validator;
using Wolfut.MirageEE.Kernal.Common;

namespace Wolfut.MirageEE.Domain.Products
{
    /// <summary>
    /// 其他入库/出库明细信息
    /// </summary>
    /// <remarks>
    /// Author: LEO
    /// Date:2009-03-14
    /// </remarks>
    [ActiveRecord("IN_OUT_WAREHOUSE_DETAILS")]
    public class InOutWarehouseOrderDetail : PersistentObjectWithGuid
    {
        #region 仓库ID
        private string warehouseID = string.Empty;
        [Property("WAREHOUSE_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "仓库号超长！")]
        public virtual string WarehouseID
        {
            get { return warehouseID; }
            set { warehouseID = value; }
        }
        #endregion

        #region 出入库类别
        private string inOutWarehouseCategoryID;
        [Property("IN_OUT_WAREHOUSE_CATEGORY_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "出入库类别超长")]
        public virtual string InOutWarehouseCategoryID
        {
            get { return inOutWarehouseCategoryID; }
            set { inOutWarehouseCategoryID = value; }
        }
        #endregion

        #region 商品ID
        private string productID;
        [Property("PRODUCT_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "商品号超长！")]
        public virtual string ProductID
        {
            get { return productID; }
            set { productID = value; }
        }
        #endregion

        #region 商品数量
        private decimal productQuantity;
        [Property("PRODUCT_QUANTITY")]
        public virtual decimal ProductQuantity
        {
            get { return productQuantity; }
            set { productQuantity = value; }
        }
        #endregion

        #region 单位成本
        private decimal unitCost;
        [Property("UNIT_COST")]
        public virtual decimal UnitCost
        {
            get { return unitCost; }
            set { unitCost = value; }
        }
        #endregion

        #region 单位成本分类
        private string unitCostCategory=string.Empty;
        [Property("UNIT_COST_CATEGORY")]
        [ValidateLength(0, 100, "单位成本分类超长")]
        public virtual string UnitCostCategory
        {
            get { return unitCostCategory; }
            set { unitCostCategory = value; }
        }
        #endregion

        #region 成本
        private decimal cost;
        [Property("COST")]
        //[ValidateRange(0, 100, "成本数据超出范围")]
        public virtual decimal Cost
        {
            get { return cost; }
            set { cost = value; }
        }
        #endregion

        #region 存货类别
        private string productCategory=string.Empty;
        [Property("PRODUCT_CATEGORY")]
        [ValidateNonEmpty, ValidateLength(0, 100, "存货类别超长！")]
        public virtual string ProductCategory
        {
            get { return productCategory; }
            set { productCategory = value; }
        }
        #endregion

        #region 是否删除
        private bool isDeleted;
        [Property("IS_DELETED")]
        public virtual bool IsDeleted
        {
            get { return isDeleted; }
            set { isDeleted = value; }
        }
        #endregion
    }
}
